﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Images.aspx.cs" Inherits="MasterWebsite.Editor.asp.net.Images" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Files Manager - ATF.COM.VN</title>
    <script src="js/jquery-1.4.2.min.js" type="text/javascript"></script>
		<script src="js/jquery.contextMenu.js" type="text/javascript"></script>
        <link href="css/jquery.contextMenu.css" rel="stylesheet" type="text/css" />
		<script type="text/javascript">
		    $(document).ready(function () {
		        // Show menu when a list item is clicked
		        $("#myList div").contextMenu({
		            menu: 'myMenu'
		        }, function (action, el, pos) {
		            if (action == "delete") {
		                location.href = "Images.aspx?action=" + action + "&fileid=" + $(el).attr("id") + "";
		            }
		        });
		    });
		</script>
<style type="text/css">


#layer1 {
	position: absolute;
	visibility: hidden;
	width: 250px;
	height: 30px;
	left: 200px;
	top: 100px;
	background-color: #fff;
	border: 1px solid #c5c5c5;
	padding: 10px;
	 z-index: 111;
}
#layer2{
	position: absolute;
	visibility: hidden;
	width: 250px;
	height: 30px;
	left: 56px;
	top: 52px;
	background-color: #fff;
	border: 1px solid #c5c5c5;
	padding: 10px;
	 z-index: 111;
}

#close {
	float: right;
}
</style>

<script type="text/javascript">
<!--
    x = 111;
    y = 52;
    function setVisible(obj) {
        obj = document.getElementById(obj);
        obj.style.visibility = (obj.style.visibility == 'visible') ? 'hidden' : 'visible';
    }
    function placeIt(obj) {
        obj = document.getElementById(obj);
        if (document.documentElement) {
            theLeft = document.documentElement.scrollLeft;
            theTop = document.documentElement.scrollTop;
        }
        else if (document.body) {
            theLeft = document.body.scrollLeft;
            theTop = document.body.scrollTop;
        }
        theLeft += x;
        theTop += y;
        obj.style.left = theLeft + 'px';
        obj.style.top = theTop + 'px';
        setTimeout("placeIt('layer1')", 500);
    }
    window.onscroll = setTimeout("placeIt('layer1')", 500);
//-->
</script>
    <script type="text/javascript">
        function post_value(strurl) {
            window.opener.document.getElementById('Images').value = strurl;
            window.opener.document.getElementById('imgname').src = "http://localhost:21820/" + strurl;
               self.close();
           }
    </script>
</head>
<body  bgcolor="#FFFFFF"  text="#000000">
    <form id="form1" runat="server">
    <div style="" id="ajxp_desktop" >
				<div id="toolbars">
					<div>
						<a style="height: 51px; display: none;" rel="prev" class="carousel-control"><img src="img/arrow_left.png"></a><a style="float: right; height: 51px; display: none;" rel="next" class="carousel-control"><img src="img/arrow_right.png"></a><div style="width: 1280px;" id="buttons_bar" class="action_bar protomenu_selector icon_text" ><div style="width:1000px;" id="buttons_inner"><div style="display:inline;" id="default_toolbar"><div style="height: 51px;" class="separator"></div><a style="position: relative; -moz-user-select: none;" class="protomenu_selector no_select_bg" id="multi_display_button" href="#"><img data-action-src="img/view_icon.png" title="Switch display mode..." alt="Switch display mode..." src="img/view_icon.png" class="actionbar_button_icon" id="multi_display_button_icon" border="0" height="16" width="16"><span class="actionbar_button_label" id="multi_display_button_label">Hiển thị</span><div class="actionbar_arrow_div"><img src="img/arrow_down.png" border="0" height="6" width="10"></div></a></div><div style="display:inline;" id="put_toolbar"><div style="height: 51px;" class="separator"></div><a style="position: relative; -moz-user-select: none;" class="protomenu_selector no_select_bg" href="#" onclick="setVisible('layer2');return false" target="_self"><img data-action-src="img/yast_backup.png" title="Upload" alt="Upload" src="img/yast_backup.png" class="actionbar_button_icon" id="upload_button_icon" border="0" height="16" width="16"><span class="actionbar_button_label" id="upload_button_label"><u>U</u>pload</span><div class="actionbar_arrow_div"><img src="img/arrow_down.png" border="0" height="6" width="10"></div></a></div></div><div style="display:inline;" id="change_toolbar"><div style="height: 51px;" class="separator"></div><a class="no_select_bg" style="-moz-user-select: none;" href="#" onclick="setVisible('layer1');return false" target="_self"><img data-action-src="folder_new.png" title="Create new directory" alt="Create new directory" src="img/folder_new.png" class="actionbar_button_icon" id="mkdir_button_icon" border="0" height="16" width="16"><span class="actionbar_button_label" id="mkdir_button_label">Tạo thư mục</span></a></div><div style="display:inline;" id="user_toolbar"><div style="height: 51px;" class="separator"></div></div></div></div>
						<div id="locationbar_cont" class="css_gradient">
							<div style="height: 100%;" class="separator"></div>
							<div style="padding-top : 5px;">
								<div id="repo_chooser"><div id="repository_form"><input id="repo_path" value="tìm kiếm" name="repo_path" type="text"></div><div style="margin-right: 7px;" class="inlineBarButton protomenu_selector" id="repository_goto"><img style="height: 16px; width: 16px; margin-left: 1px; margin-right: 1px; margin-top: 3px;"  title="Switch Repository to..." src="img/xmag.png" height="16" width="16"></div></div>
							</div>
						</div>
					</div>
				
				<div  id="browser">
					<div class="no_select_bg" style="position: relative; -moz-user-select: none; padding-top:10px;" id="vertical_splitter" ><asp:label id="output" runat="server" /></div>
					
				</div>
			</div>

            <div id="layer1"><span id="close"><a style="TEXT-DECORATION: none" 
href="javascript:setVisible('layer1')"><strong>x</strong></a></span> 
<asp:TextBox ID="txtFolder" runat="server"></asp:TextBox>
<asp:Button ID="btnCreateFolder" runat="server" Text="Tạo mới" onclick="btnCreateFolder_Click" />
 </div>
   
    <div id="layer2"> 
<asp:FileUpload ID="txtFile" runat="server" /><asp:Button ID="btnUpload" runat="server" Text="Upload" onclick="btnUpload_Click"/>
 </div>
    


    <ul id="myMenu" class="contextMenu">
			<li class="edit"><a href="#open" onclick="alert('Chức năng bị khóa!')">Mở ảnh</a></li>
			<li class="cut separator"><a href="#download" onclick="alert('Chức năng bị khóa!')">Tài về</a></li>
			<li class="copy"><a href="#rename" onclick="alert('Chức năng bị khóa!')">Đổi tên ảnh</a></li>
			<li class="delete separator"><a href="#delete">Xóa ảnh</a></li>
		</ul>
          

  
</form>
</body>
</html>
